package com.mgblog.web.action;


import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.mgblog.service.inter.ItemServiceInter;
import com.mgblog.vo.Item;

/**
 * 全局跳转action
 * @author Administrator
 *
 */
@Controller
public class GlobalForwardAction {
	@Resource
	private ItemServiceInter itemService;
	public String testAddItem(){
		Item item = new Item();
		item.setName("新浪");
		item.setUrl("http://www.sina.com");
		item.setCreateTime(new Date());
		if(itemService.addItem(item)){
			return "success";
		}else{
			return "error";
		}
	}
	
}
